package org.dromara.legal.domain.bo;

import org.dromara.common.core.xss.Xss;
import org.dromara.legal.domain.Consult;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 咨询业务对象 le_consult
 *
 * @author zhuqingrun
 * @date 2024-10-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Consult.class, reverseConvertGenerate = false)
public class ConsultBo extends BaseEntity {

    /**
     * 咨询id
     */
    @NotNull(message = "咨询id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 咨询律师id
     */
    @NotNull(message = "咨询律师id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long lawyerId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(max = 50, message = "标题长度不能超过50个字符", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 电话
     */
    @NotBlank(message = "电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phone;

    /**
     * 咨询内容
     */
    @NotBlank(message = "咨询内容不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(max = 200, message = "标题长度不能超过200个字符", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 图片
     */
    @Xss(message = "图片不能包含脚本字符")
    private String img;

    /**
     * 状态（0未回复，1已回复）
     */
    private String status;


}
